Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add #![feature(const_fn_floating_point_arithmetic)] #77122

Merged
merged 6 commits into from
Sep 26, 2020

Conversation

ecstatic-morse
Copy link
Contributor

@ecstatic-morse ecstatic-morse commented Sep 23, 2020

cc #76618

This is a template for splitting up const_fn into granular feature gates. I think this will make it easier, both for us and for users, to track stabilization of each individual feature. We don't have to do this, however. We could also keep stabilizing things out from under const_fn.

cc @rust-lang/wg-const-eval
r? @oli-obk

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 23, 2020
@ecstatic-morse

This comment has been minimized.

@ecstatic-morse ecstatic-morse marked this pull request as ready for review September 23, 2020 20:30
@oli-obk
Copy link
Contributor

oli-obk commented Sep 24, 2020

We don't have to do this, however. We could also keep stabilizing things out from under const_fn.

I'm in full agreement that we should do this and eliminate the const_fn feature gate entirely

r=me with Ralf's nit

@RalfJung
Copy link
Member

@bors r=oli-obk,RalfJung

@bors
Copy link
Contributor

bors commented Sep 24, 2020

📌 Commit a4fe056e70fcbdc303b8709699ed38d92d0b888b has been approved by oli-obk,RalfJung

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 24, 2020
@ecstatic-morse
Copy link
Contributor Author

cc #57241

@bors
Copy link
Contributor

bors commented Sep 25, 2020

☔ The latest upstream changes (presumably #77172) made this pull request unmergeable. Please resolve the merge conflicts.

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 25, 2020
This refactors handling of `Rvalue::{Unary,Binary}Op` in the
const-checker. Now we `span_bug` if there's an unexpected type in a
primitive operation. This also allows unary negation on
`char` values through the const-checker because it makes the code a bit
cleaner. `char` does not actually support these operations, and if it
did, we could evaluate them at compile-time.
@ecstatic-morse
Copy link
Contributor Author

@bors r=RalfJung,oli-obk rollup

@bors
Copy link
Contributor

bors commented Sep 25, 2020

📌 Commit 659028f has been approved by RalfJung,oli-obk

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 25, 2020
RalfJung added a commit to RalfJung/rust that referenced this pull request Sep 26, 2020
… r=RalfJung,oli-obk

Add `#![feature(const_fn_floating_point_arithmetic)]`

cc rust-lang#76618

This is a template for splitting up `const_fn` into granular feature gates. I think this will make it easier, both for us and for users, to track stabilization of each individual feature. We don't *have* to do this, however. We could also keep stabilizing things out from under `const_fn`.

cc @rust-lang/wg-const-eval
r? @oli-obk
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 26, 2020
Rollup of 12 pull requests

Successful merges:

 - rust-lang#75454 (Explicitly document the size guarantees that Option makes.)
 - rust-lang#76631 (Add `x.py setup`)
 - rust-lang#77076 (Add missing code examples on slice iter types)
 - rust-lang#77093 (merge `need_type_info_err(_const)`)
 - rust-lang#77122 (Add `#![feature(const_fn_floating_point_arithmetic)]`)
 - rust-lang#77127 (Update mdBook)
 - rust-lang#77161 (Remove TrustedLen requirement from BuilderMethods::switch)
 - rust-lang#77166 (update Miri)
 - rust-lang#77181 (Add doc alias for pointer primitive)
 - rust-lang#77204 (Remove stray word from `ClosureKind::extends` docs)
 - rust-lang#77207 (Rename `whence` to `span`)
 - rust-lang#77211 (Remove unused #[allow(...)] statements from compiler/)

Failed merges:

 - rust-lang#77170 (Remove `#[rustc_allow_const_fn_ptr]` and add `#![feature(const_fn_fn_ptr_basics)]`)

r? `@ghost`
@bors bors merged commit 3b544e7 into rust-lang:master Sep 26, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 26, 2020
@ecstatic-morse ecstatic-morse deleted the const-fn-arithmetic branch October 6, 2020 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants